package netty.rpc.client.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author Jim
 * @version 1.0.0
 * @descripition:
 * @date 2022/5/25 23:38
 */
@ConfigurationProperties(ServiceProperties.SERVICE_PROPERTIES_PREFIX)
public class ServiceProperties {

    public static final String SERVICE_PROPERTIES_PREFIX = "simple.netty.rpc.service";

    private Integer port;

    private String serviceName;

    private String version;

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getVersion() {
        return version==null?"1.0.0":version;
    }

    public void setVersion(String version) {
        this.version = version;
    }
}
